Add some error checking to xen-clone
fi
# identify this version of linux
-LINUX_VER=`( /bin/ls -ld ${DEST_BK_REP}/xenolinux-sparse || /bin/ls -ld xenolinux-*-sparse ) 2>/dev/null | sed -e 's!^.*xenolinux-\([0-9.]\+\)-sparse!\1!'`
+LINUX_VER=`( /bin/ls -ld ${DEST_BK_REP}/xenolinux-sparse || /bin/ls -ld ${DEST_BK_REP}/xenolinux-*-sparse ) 2>/dev/null | sed -e 's!^.*xenolinux-\(.\+\)-sparse!\1!'`
+
+if [ -z "${LINUX_VER}" ]
+then
+echo Unable to identify Linux version. Bailing.
+exit -1
+fi
# copy in the master Linux tree for this kernel
if [ ! -d linux-${LINUX_VER} ]